package com.xuetang9.t9.hotel.services.impl;

import com.xuetang9.t9.hotel.beans.BlackList;
import com.xuetang9.t9.hotel.mapper.IBlackListMapper;
import com.xuetang9.t9.hotel.mapper.condition.impl.BlackListCondition;
import com.xuetang9.t9.hotel.services.IBlackListService;
import com.xuetang9.t9.hotel.utils.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 黑名单业务
 * @author pang
 */
@Service("BlackListServiceImpl")
public class BlackListServiceImpl implements IBlackListService {

    @Autowired
    private IBlackListMapper blackListMapper;


    @Override
    public boolean save(BlackList blackList) {
        if(blackList == null){
            return false;
        }
        return blackListMapper.insert(blackList) > 0;
    }

    @Override
    public boolean update(BlackList blackList) {
        if(blackList == null){
            return false;
        }
        return blackListMapper.update(blackList) > 0;
    }

    @Override
    public boolean remove(Integer id) {
        if(null == id){
            return false;
        }
        return blackListMapper.delete(id) > 0;
    }

    @Override
    public ResponseResult queryByAll(BlackListCondition blackListCondition) {
        return null;
    }

    @Override
    public ResponseResult queryByCount(BlackListCondition blackListCondition) {
        return null;
    }
}
